package com.example.shixunandjavagotoyangchen.Sunshine.App;

import android.app.Application;
import android.content.Context;

import com.alibaba.android.arouter.launcher.ARouter;
import com.umeng.commonsdk.UMConfigure;
import com.umeng.socialize.PlatformConfig;
import com.uuzuche.lib_zxing.activity.ZXingLibrary;

public class BasterApp extends Application {

    public static Context context;

    @Override
    public void onCreate() {
        super.onCreate();
        //-------初始化全局上下文
        context=this;
        //-------ARouter跳转初始化
        ARouter.openDebug();
        ARouter.openLog();
        ARouter.init(this);
        //---------二维码初始化
        ZXingLibrary.initDisplayOpinion(this);

        //友盟分享初始化
        UMConfigure.init(this,"5a12384aa40fa3551f0001d1"
                ,"umeng",UMConfigure.DEVICE_TYPE_PHONE,"");//58edcfeb310c93091c000be2 5965ee00734be40b580001a0
        // QQ设置
        PlatformConfig.setQQZone("101830139","5d63ae8858f1caab67715ccd6c18d7a5");
        PlatformConfig.setQQFileProvider("com.tencent.sample2.fileprovider");
    }

    @Override
    public void onTrimMemory(int level) {
        super.onTrimMemory(level);
        ARouter.getInstance().destroy();
    }
}
